// import { Map } from 'immutable'
import { Map } from 'immutable'
import * as actionTypes from './constants'
const defaultState = Map({
  banners: [],
  hotRecommendList: [],
  newAlbumList: [],
  fastTopList: [],
  newTopList: [],
  orginTopList: [],
  artistList: [],
  hotDjList:[]
})

function reducer(state = defaultState, action) {
  switch (action.type) {
    case actionTypes.CHANGE_BANNERS_ACTION:
      return state.set('banners', action.banners)
    case actionTypes.CAHNGE_HOT_RECOMMEND_DATA:
      return state.set('hotRecommendList', action.hotRecommendList)
    case actionTypes.CHANGE_NEW_ALBUM_DATA:
      return state.set('newAlbumList', action.newAlbumList)
    case actionTypes.CAHNGE_FAST_TOP_LIST_DATA:
      return state.set('fastTopList',action.fastTopList)
    case actionTypes.CAHNGE_NEW_TOP_LIST_DATA:
      return state.set('newTopList',action.newTopList)
    case actionTypes.CAHNGE_ORGIN_TOP_LIST_DATA:
      return state.set('orginTopList', action.orginTopList)
    case actionTypes.CHANGE_SETTLE_ARTIST_DATA:
      return state.set('artistList', action.artistList)
    case actionTypes.CHANGE_HOT_DJ_DATA:
      return state.set('hotDjList',action.hotDjList)
    default:
      return state
  }
}
export default reducer